using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._Overlay
{
    /// <summary>
    /// <para>Erase</para>
    /// <para>Creates a feature class by overlaying the input features with the erase features. Only those portions of the input features falling outside the erase features  are copied to the output feature class.</para>
    /// <para>通过将输入要素与拭除要素叠加来创建要素类。只有位于拭除要素之外的输入要素部分才会被复制到输出要素类中。</para>
    /// </summary>    
    [DisplayName("Erase")]
    public class Erase : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Erase()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input feature class or layer.</para>
        /// <para>输入要素类或图层。</para>
        /// </param>
        /// <param name="_erase_features">
        /// <para>Erase Features</para>
        /// <para>The features to be used to erase coincident features in the input.</para>
        /// <para>用于擦除输入中的重合特征的特征。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The feature class that will contain only those input features that are not coincident with the erase features.</para>
        /// <para>仅包含与擦除要素不重合的输入要素的要素类。</para>
        /// </param>
        public Erase(object _in_features, object _erase_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._erase_features = _erase_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Erase";

        public override string CallName => "analysis.Erase";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "parallelProcessingFactor", "qualifiedFieldNames"];

        public override object[] ParameterInfo => [_in_features, _erase_features, _out_feature_class, _cluster_tolerance];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature class or layer.</para>
        /// <para>输入要素类或图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Erase Features</para>
        /// <para>The features to be used to erase coincident features in the input.</para>
        /// <para>用于擦除输入中的重合特征的特征。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Erase Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _erase_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The feature class that will contain only those input features that are not coincident with the erase features.</para>
        /// <para>仅包含与擦除要素不重合的输入要素的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>XY Tolerance</para>
        /// <para><xdoc>
        ///   <para>The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in X or Y (or both).</para>
        ///   <para>Changing this parameter's value may cause failure or unexpected results. It is recommended that this parameter not be modified. It has been removed from view in the tool dialog. By default, the input feature class's spatial reference x,y tolerance property is used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>分隔所有要素坐标（节点和折点）的最小距离，以及坐标可以在 X 或 Y（或两者）中移动的距离。</para>
        ///   <para>更改此参数的值可能会导致失败或意外结果。建议不要修改该参数。它已从工具对话框的视图中删除。默认情况下，将使用输入要素类的空间参考 x，y 容差属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("XY Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _cluster_tolerance { get; set; } = null;


        public Erase SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object parallelProcessingFactor = null, bool? qualifiedFieldNames = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, parallelProcessingFactor: parallelProcessingFactor, qualifiedFieldNames: qualifiedFieldNames);
            return this;
        }

    }

}